package com.ocm.core.service;

import java.util.List;

import com.ocm.core.domain.ClassDefinition;
import com.ocm.core.domain.PropertyDefinition;
import com.ocm.core.domain.Storage;
import com.ocm.core.model.ClassInstance;
import com.ocm.core.model.Files;

public interface OCMService {

   public ClassInstance createStorage(Storage storage);

   public ClassInstance createClassDefintion(ClassDefinition classDefinition);

   public ClassInstance createClassInstance(ClassInstance classInstance);

   public boolean checkout(ClassDefinition classDefinition);

   public boolean cancelCheckout(ClassDefinition classDefinition);

   public boolean checkin(ClassInstance classInstance);

   public boolean update(ClassInstance classInstance);

   public boolean syncSecurity(ClassDefinition classDefinition);

   public void removeLastVersion(ClassDefinition classDefinition);

   public Files download(ClassDefinition classDefinition);

   public Files download(Storage storage, String guid, List<PropertyDefinition> properties);

   public List<ClassInstance> getClassInstanceProperties(
         Storage storage, List<ClassDefinition> classDefinitions, String[] excludeProperties);

   public void removeClassDefintion(ClassDefinition classDefinition);

   public List<ClassInstance> getHistory(ClassDefinition classDefinition);

   public Object getPropertyValue(Storage storage, String classInstGUID, PropertyDefinition propertyDefinition, List<PropertyDefinition> filterProperties, int maxItems);
}
